package com.lt.relacalc;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Arrays;
import java.util.Stack;

import com.lt.bigcalc.BigCalcFrame;
import com.lt.bigcalc.CalcModel;
import com.lt.bigcalc.Controller;
import com.lt.util.CalcCallback;

public class ButtonListener implements ActionListener {

	private CalcCallback calcCallback;
	private Calc calc = new Calc();
	String result2 = "";
	boolean isClicked = false;
	public ButtonListener(CalcCallback callback) {

		this.calcCallback = callback;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		String command = e.getActionCommand();
		
		switch (command) {
		case "":
			//当等号按下时，删除按钮等于清除
			if (isClicked) {
				calc.clear();
				result2 = "";
				calc.push("我");
				calcCallback.showResult(calc.getResult());
				calcCallback.showInput(calc.getResult());
				calcCallback.reset();
				isClicked = false;
			} else {
				// 栈的大小大于1时才能删除否则报错
				if (calc.getStackSize() > 1) {
					calcCallback.showInput(calc.getResult());
					calcCallback.reset();
					calc.pop();
					calcCallback.showInput(calc.getResult());
					if (calc.getStackSize() >= 4) {
						int len = calc.getStackSize() - 4;
						System.out.println("len: " + len);
						String temp = "";
						while (len >= 0) {
							temp = calc.pop();
							System.out.println(calc.getResult());
							len--;
						}
						result2 = calcResult(calc.getResult().substring(1));
						System.out.println("1" + result2);
						result2 = calcResult(result2 + temp);
						calc.push(temp);
					} else {
						System.out.println("2" + result2);
						result2 = calcResult(calc.getResult().substring(1));
					}

					calcCallback.showResult(result2);
				} else {
					calcCallback.error(2);
				}
			}
			break;
		case "AC":
			//清除
			calc.clear();
			result2 = "";
			calc.push("我");
			calcCallback.showResult(calc.getResult());
			calcCallback.showInput(calc.getResult());
			calcCallback.reset();
			break;
		case "Big":
			// 模型		
			CalcModel model = new CalcModel();
			// 控制器
			Controller controller = new Controller();
			controller.setModel(model);
			// 视图
			BigCalcFrame panel1 = new BigCalcFrame(controller);		
			// 模型设置回调接口（视图实现了回调接口）
			model.setCallback(panel1);
			controller.setCallback(panel1);
			model.addObserver(panel1);
			calcCallback.chageFrame();
			break;
		case "互查":
			if(isClicked){
				String each = getEachResult(result2);
				calcCallback.showResult(each);
			}
			break;
		case "=":		
			isClicked = true;
//			calcCallback.showInput(calc.getResult());
//			calcResult(calc.getResult());
			calcCallback.error(3);
			break;
		default:
			calc.push(command);			
			calcCallback.showInput(calc.getResult());			
			result2 =calcResult( result2 + command);		
			calcCallback.showResult(result2);
			if(!result2.contains("！")&&!result2.contains("远哈")){
			    calcCallback.showResult(result2);			  
			}else{				
				calcCallback.error(1);
				calcCallback.showResult(result2);				
			}			
			break;
		}

	}
    /**
     * 互查功能
     * @param result
     * @return
     */
	private String getEachResult(String result) {
		String[] show = {"曾祖父","曾祖母","伯公","叔公","祖姑母","爸爸//伯伯//叔叔", "姑姑", 
				"奶奶", "太外公","太外婆", "舅祖父", "姨奶奶","爷爷","伯伯", "堂哥//堂弟", 
				"堂姐//堂妹","伯母","叔叔", "叔母", "表哥//表弟","表姐//表妹", "姑父", "老爸", 
				"老妈", "我//哥哥//弟弟", "我//姐姐//妹妹","儿子//侄子","闺女//侄女", 
				"媳妇//嫂嫂//弟妹","儿子//外甥", "女儿//外甥女", "老公//姐夫//妹夫",  
				"外公","外婆", "舅舅", "说姨妈不说大", "姨","你滴老爹","外太公", "外太婆", 
				"外伯公","外叔公","外姑婆","外太外公","外太外婆","外舅公", "外姨婆", 
				"姨妈//姨","舅母","姨父","你滴老娘","哥哥", "姐姐", 
				"侄子","侄女","嫂嫂","弟弟","妹妹","外甥", "外甥女","姐夫","妹夫", "侄孙子",
				"侄孙女","侄媳","外侄孙子", "外侄孙女","侄女婿", "姻世伯","姻伯母", "姻兄//姻弟", 
				"姻姐//姻妹", "弟妹", "闺女//外甥女","外甥孙", "外甥孙女","外甥媳妇", "外甥女婿", 
				"你自己咯","媳妇老婆宝贝什么的都可以的","儿子","闺女","孙子","孙女", "儿媳", 
				"外孙子","外孙女", "女婿", "曾孙", "曾孙女", "孙媳妇", "外曾孙","外曾孙女", 
				"孙女婿","亲家公", "亲家母", "姻侄", "姻侄女", "外孙媳妇", "外孙女婿", "祖翁", "祖婆",
				"伯翁","叔翁", "姑婆", "老公//大伯哥//小叔子", "大姑姐//小姑子", "舅老爷", 
				"公公", "婆婆","大伯哥","大姑姐", "妯娌", "小叔子", "小姑子", "姑爷", "老公", "太岳父", 
				"太岳母", "伯岳", "叔岳", "姑岳母", "大舅子//小舅子", "大姨子//老婆//小姨子", "丈母娘",
				"外太岳父", "外太岳母", "舅岳父", "姨岳母", "老丈人", "内侄", "内侄女", "舅嫂", "内甥", 
				"内甥女", "大姨夫", "小姨夫"	,"大舅子"	,"小舅子"	,"大姨姐"	,"小姨子"
		};
		for (int i = 0; i < show.length; i++) {
			if (show[i].equals("老公//大伯哥//小叔子")) {
				System.out.println("show"+" "+i);
			}
		}
		String[] data ={
				"曾孙//曾孙女","曾孙//曾孙女","侄孙//孙女","侄孙//孙女","侄孙//孙女","儿子（闺女）//侄子（侄女）",
				"侄子//侄女",
				"孙子//孙女","外曾孙//外曾孙女","外曾孙//外曾孙女","外甥孙//外甥孙女","姨外甥//姨外甥女 ","孙子//孙女",
				"侄子//侄女",
				"堂弟（堂妹）//堂哥（堂姐）","堂弟（堂妹）//堂哥（堂姐）","侄子//侄女","侄子//侄女","侄子//侄女",
				"表弟（表妹）//表哥（表姐）","表弟（表妹）//表哥（表姐）",
				"侄子//侄女","儿子//闺女","儿子//闺女","我//弟弟//哥哥","我//妹妹//姐姐","爸爸//伯伯//叔叔",
				"爸爸//伯伯//叔叔","老公//夫弟（夫妹）//夫兄（夫姐）","爸爸//舅舅","爸爸//舅舅","媳妇//小姨子//大姨姐",
				"外孙//外孙女","外孙//外孙女","外甥//外甥女 ","襟侄//襟侄女","襟侄//襟侄女","儿子//闺女","外曾孙//外曾孙女 ",
				"外曾孙//外曾孙女 ","外侄孙//外侄孙女","外侄孙//外侄孙女","外侄孙//外侄孙女","外弥甥//外弥甥女","外弥甥//外弥甥女",
				"外甥孙子//外甥孙女","外甥孙子//外甥孙女","外甥//外甥女","外甥//外甥女","外甥//外甥女",
				"儿子//闺女",
				"弟弟//妹妹","弟弟//妹妹","伯伯//叔叔","伯伯//叔叔","夫弟（夫妹）","哥哥//姐姐","哥哥//姐姐","舅舅//姨",
				"舅舅//姨","小舅子//小姨子",
				"大舅子//大姨姐","伯公//叔公","伯公//叔公","伯父//叔叔//姑姑","外伯公//外叔公","外伯公//外叔公",
				"伯父//叔叔//姑姑","姻家侄","姻家侄","姻兄//姻弟",
				"姻姐//姻妹","大伯哥//大姑姐","妈妈//姨妈","舅祖父//舅祖母","舅祖父//舅祖母","舅舅//姨妈","舅舅//姨妈","你自己咯",
				"老公","爸爸","爸爸","爷爷//奶奶","爷爷//奶奶",
				"公公//婆婆","外公//外婆","外公//外婆","老丈人//丈母娘","曾祖父//曾祖母","曾祖父//曾祖母","爷爷//奶奶",
				"太外公//太外婆","太外公//太外婆",
				"爷爷//奶奶","亲家公//亲家母","亲家公//亲家母","姻世伯//姻伯母","姻世伯//姻伯母","外公//外婆","外公//外婆","孙媳妇","孙媳妇",
				"侄孙媳妇","侄孙媳妇","侄孙媳妇","老婆//弟妹//嫂嫂",
				"弟媳//嫂嫂","外孙 //外孙女","儿媳","儿媳","弟媳","弟媳","妯娌","嫂嫂","嫂嫂","舅嫂","媳妇","孙女婿",
				"孙女婿","侄女婿","侄女婿","侄女婿",
				"妹夫//姐夫","妹夫//老公//姐夫","女婿","外孙女婿","外孙女婿","外侄孙女婿","外侄孙女婿","女婿","姨父","姨父","小姑夫",
				"姨父","姨父","小姨夫","大姨夫","妹夫","姐夫","妹夫","姐夫"
				
		};
		for (int i = 0; i < data.length; i++) {
			if (data[i].equals("老婆//弟妹//嫂嫂")) {
				System.out.println("data"+" "+i);
			}
		}
		System.out.println(show.length+" "+data.length);
		for (int i = 0; i < data.length; i++) {
			
			if (result.equals(show[i])) {
				result = data[i];				
			}
		}
		return result;
	}
	/**
	 * 计算结果
	 * 如果参数与show数组里的字符串相等，就返回data数组对应的字符串
	 * @param result
	 * @return
	 */
	private String calcResult(String result) {
		result = result.replace("的", "");
		boolean isFind = false;
		//一个称呼
		String[] show2 = { "老爸", "老妈", "哥哥", "弟弟", "姐姐", "妹妹", "儿子", "女儿", "老公", "媳妇" };
		String[] data2 = { "老爸", "老妈", "哥哥", "弟弟", "姐姐", "妹妹", "儿子", "女儿", "老公", "媳妇" };
        //两个称呼
		String[] show4 = new String[show2.length * show2.length];
		String[] data4 = { 
				"爷爷", "奶奶", "伯伯", "叔叔", "姑姑", "姑姑", "我//哥哥//弟弟", "我//姐姐//妹妹", "你确定你这样查你妈不会打死你！", "你滴老娘",
				"外公", "外婆", "舅舅", "舅舅", "说姨妈不说大", "小姨妈", "我//哥哥//弟弟", "我//姐姐//妹妹", "你滴老爹", "你确定你这样查你爸不会打死你！", 
				"你滴老爹", "你滴老娘", "哥哥", "我//哥哥//弟弟", "姐姐", "我//姐姐//妹妹", "侄子", "侄女", "这个问题你得亲自去问你哥！0.0", "嫂嫂", 
				"你滴老爹", "你滴老娘","我//哥哥//弟弟", "弟弟", "我//姐姐//妹妹", "妹妹", "侄子", "侄女", "这个问题你得亲自去问你弟！0.0", "弟妹", 
				"你滴老爹", "你滴老娘", "哥哥","我//哥哥//弟弟", "姐姐", "我//姐姐//妹妹", "外甥", "外甥女", "姐夫", "这个问题你得亲自去问你姐！0.0", 
				"你滴老爹", "你滴老娘", "我//哥哥//弟弟","弟弟", "我//姐姐//妹妹", "妹妹", "外甥", "外甥女", "妹夫", "这个问题你得亲自去问你妹！0.0", 
				"你自己咯", "媳妇", "儿子", "儿子","闺女", "闺女", "孙子", "孙女", "你这个儿子了不得啊！", "儿媳", 
				"你自己咯", "媳妇", "儿子", "儿子", "闺女", "闺女", "外孙子","外孙女", "女婿", "你这个闺女了不得啊！", 
				"公公", "婆婆", "大伯哥", "小叔子", "大姑子", "小姑子", "儿子", "闺女", "你这个问题有点怪啊！0.0","如果只有一个的话，那就是你咯0.0", 
				"老丈人", "丈母娘", "大舅子", "小舅子", "大姨姐", "小姨子", "儿子", "闺女", "应该是你没错了0.0", "我忍住不笑可以吧！0.0" };
		int k4 = 0;
		for (int i = 0; i < show2.length; i++) {
			for (int j = 0; j < show2.length; j++) {
				show4[k4] = data2[i] + show2[j];
				if (k4 < show4.length) {
					k4++;
				}
			}
		}	
		//三个称呼
		String[] show6 = new String[show4.length * show2.length];
		String[] data6 = {
				"曾祖父","曾祖母","伯公","叔公","祖姑母","祖姑母","爸爸//伯伯//叔叔","姑姑","老铁，不存在的！","奶奶",
				"太外公","太外婆","舅祖父","舅祖父","姨奶奶","姨奶奶","爸爸//伯伯//叔叔","姑姑","爷爷","老铁，不存在滴！",
				"爷爷","奶奶","伯伯","爸爸//伯伯//叔叔","姑姑","姑姑","堂哥//堂弟","堂姐//堂妹","老铁，不存在的！","伯母",
				"爷爷","奶奶","爸爸//伯伯//叔叔","叔叔","姑姑","姑姑","堂哥//堂弟","堂姐//堂妹","老铁，不存在的！","叔母",
				"爷爷","奶奶","爸爸//伯伯//叔叔","爸爸//伯伯//叔叔","姑姑","姑姑","表哥//表弟","表姐//表妹","姑父","老铁，不存在的！",
				"爷爷","奶奶","爸爸//伯伯//叔叔","爸爸//伯伯//叔叔","姑姑","姑姑","表哥//表弟","表姐//表妹","姑父","老铁，不存在的！",
				"老爸","老妈","我//哥哥//弟弟","我//哥哥//弟弟","我//姐姐//妹妹","我//姐姐//妹妹","儿子//侄子","闺女//侄女","一般人都很矗滴！","媳妇//嫂嫂//弟妹",
				"老爸","老妈","我//哥哥//弟弟","我//哥哥//弟弟","我//姐姐//妹妹","我//姐姐//妹妹","儿子//外甥","女儿//外甥女","老公//姐夫//妹夫","一般人都很矗滴",
				"跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！",						
				"外公", "外婆", "舅舅", "舅舅", "说姨妈不说大", "姨", "我//哥哥//弟弟", "我//姐姐//妹妹", "你的老爹", "你确定你这样查你爸不会打死你!", 
				"外太公","外太婆","外伯公","外叔公","外姑婆","外姑婆","舅舅","姨妈","老铁，不存在的！","外婆",
				"外太外公","外太外婆","外舅公","外舅公","外姨婆","外姨婆","舅舅","姨妈","外公","老铁，不存在的！",
				"外公","外婆","舅舅","舅舅","姨妈//姨","姨妈//姨","表哥//表弟","表姐//表妹","老铁，不存在的！","舅母",
				"外公","外婆","舅舅","舅舅","姨妈//姨","姨妈//姨","表哥//表弟","表姐//表妹","老铁，不存在的！","舅母",
				"外公","外婆","舅舅","舅舅","姨妈//姨","姨妈//姨","表哥//表弟","表姐//表妹","姨父","老铁，不存在的！",
				"外公","外婆","舅舅","舅舅","姨妈//姨","姨妈//姨","表哥//表弟","表姐//表妹","姨父","老铁，不存在的！",
				"老爸","老妈","我//哥哥//弟弟","我//哥哥//弟弟","我//姐姐//妹妹","我//姐姐//妹妹","儿子//侄子","闺女//侄女","一般人都很矗的！","媳妇//嫂嫂//弟妹",
				"老爸","老妈","我//哥哥//弟弟","我//哥哥//弟弟","我//姐姐//妹妹","我//姐姐//妹妹","儿子//外甥","女儿//外甥女","老公//姐夫//妹夫","一般人都很矗的！",
				"爷爷", "奶奶", "伯伯", "叔叔", "姑姑", "姑姑", "我//哥哥//弟弟", "我//姐姐//妹妹", "你确定你这样查你妈不会打死你！", "你滴老娘",
				"跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！",						
				"爷爷", "奶奶", "伯伯", "叔叔", "姑姑", "姑姑", "我//哥哥//弟弟", "我//姐姐//妹妹", "你确定你这样查你妈不会打死你!", "你滴老娘",
				"外公", "外婆", "舅舅", "舅舅", "说姨妈不说大", "姨", "我//哥哥//弟弟", "我//姐姐//妹妹", "你滴老爹", "你确定你这样查你爸不会打死你！", 
				"你滴老爹","你滴老娘", "哥哥", "我//哥哥//弟弟", "姐姐", "我//姐姐//妹妹", "侄子", "侄女", "这个问题你得亲自去问你哥！0.0", "嫂嫂", 
				"你滴老爹", "你滴老娘","我//哥哥//弟弟", "弟弟", "我//姐姐//妹妹", "妹妹", "儿子//侄子","闺女//侄女", "这个问题你得亲自去问你弟！0.0", "媳妇//嫂嫂//弟妹", 
				"你滴老爹", "你滴老娘", "哥哥","我//哥哥//弟弟", "姐姐", "我//姐姐//妹妹", "外甥", "外甥女", "姐夫", "这个问题你得亲自去问你姐！0.0", 
				"你滴老爹", "你滴老娘", "我//哥哥//弟弟","弟弟", "我//姐姐//妹妹", "妹妹", "外甥", "外甥女", "妹夫", "这个问题你得亲自去问你妹！0.0", 				
				"哥哥","嫂嫂","侄子","侄子","侄女","侄女","侄孙子","侄孙女","一般人都很矗的！","侄媳",
				"哥哥","嫂嫂","侄子","侄子","侄女","侄女","外侄孙子","外侄孙女","侄女婿","一般人都很矗的！",
				"跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！",						
				"姻世伯","姻伯母","姻兄//姻弟","姻兄//姻弟","姻姐//姻妹","姻姐//姻妹","侄子","侄女","哥哥","老铁，不存在的！",
				"爷爷", "奶奶", "伯伯", "叔叔", "姑姑", "姑姑", "我//哥哥//弟弟", "我//姐姐//妹妹", "你确定你这样查你妈不会打死你！", "你滴老娘",
				"外公", "外婆", "舅舅", "舅舅", "说姨妈不说大", "姨", "我//哥哥//弟弟", "我//姐姐//妹妹", "你滴老爹", "你确定你这样查你爸不会打死你！",
				"你滴老爹", "你滴老娘","我//哥哥//弟弟", "我//哥哥//弟弟", "我//姐姐//妹妹", "我//姐姐//妹妹", "儿子//侄子","闺女//侄女", "这个问题你得亲自去问！0.0", "媳妇//嫂嫂//弟妹", 
				"你滴老爹", "你滴老娘","我//哥哥//弟弟", "弟弟", "我//姐姐//妹妹", "妹妹", "侄子", "侄女", "这个问题你得亲自去问你弟，0.0", "弟妹", 
				"你滴老爹", "你滴老娘", "我//哥哥//弟弟","我//哥哥//弟弟", "我//姐姐//妹妹", "我//姐姐//妹妹", "儿子//外甥", "闺女//外甥女", "老公//姐夫//妹夫", "这个问题你得亲自去问！0.0",
				"你滴老爹", "你滴老娘", "我//哥哥//弟弟","弟弟", "我//姐姐//妹妹", "妹妹", "外甥", "外甥女", "妹夫", "这个问题你得亲自去问你妹！0.0", 	
				"弟弟","弟妹","侄子","侄子","侄女","侄女","侄孙子","侄孙女","一般人都很矗的！","侄媳",
				"弟弟","弟妹","侄子","侄子","侄女","侄女","外侄孙子","外侄孙女","侄女婿","一般人都很矗滴！",
				"跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！",						
				"姻世伯","姻伯母","姻兄//姻弟","姻兄//姻弟","姻姐//姻妹","姻姐//姻妹","侄子","侄女","弟弟","老铁，不存在滴！",
				"爷爷", "奶奶", "伯伯", "叔叔", "姑姑", "姑姑", "我//哥哥//弟弟", "我//姐姐//妹妹", "你确定你这样查你妈不会打死你！", "你滴老娘",
				"外公", "外婆", "舅舅", "舅舅", "说姨妈不说大", "姨", "我//哥哥//弟弟", "我//姐姐//妹妹", "你滴老爹", "你确定你这样查你爸不会打死你！",
				"你滴老爹", "你滴老娘","哥哥", "我//哥哥//弟弟", "姐姐", "我//姐姐//妹妹","侄子", "侄子", "这个问题你得亲自去问，0.0", "嫂嫂", 
				"你滴老爹", "你滴老娘","我//哥哥//弟弟", "我//哥哥//弟弟", "我//姐姐//妹妹", "我//姐姐//妹妹", "儿子//侄子","闺女//侄女", "这个问题你得亲自去问，0.0", "媳妇//嫂嫂//弟妹", 
				"你滴老爹", "你滴老娘", "哥哥","我//哥哥//弟弟", "姐姐", "我//姐姐//妹妹", "外甥", "外甥女", "姐夫", "这个问题你得亲自去问你姐！0.0",
				"你滴老爹", "你滴老娘", "我//哥哥//弟弟","我//哥哥//弟弟", "我//姐姐//妹妹", "我//姐姐//妹妹", "儿子//外甥", "闺女//外甥女", "老公//姐夫//妹夫", "这个问题你得亲自去问！0.0",
				"姐姐","姐夫","外甥","外甥","外甥女","外甥女","外甥孙","外甥孙女","一般人都很矗的！","外甥媳妇",
				"姐姐","姐夫","外甥","外甥","外甥女","外甥女","外甥孙","外甥孙女","外甥女婿","一般人都很矗滴！",
				"姻世伯","姻伯母","姻兄//姻弟","姻兄//姻弟","姻姐//姻妹","姻姐//姻妹","外甥","外甥女","老铁，不存在滴！","姐姐",
				"跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！",						
				"爷爷", "奶奶", "伯伯", "叔叔", "姑姑", "姑姑", "我//哥哥//弟弟", "我//姐姐//妹妹", "你确定你这样查你妈不会打死你！", "你滴老娘",
				"外公", "外婆", "舅舅", "舅舅", "说姨妈不说大", "姨", "我//哥哥//弟弟", "我//姐姐//妹妹", "你滴老爹", "你确定你这样查你爸不会打死你！",
				"你滴老爹", "你滴老娘","我//哥哥//弟弟", "我//哥哥//弟弟", "我//姐姐//妹妹", "我//姐姐//妹妹","儿子//侄子", "闺女//侄女", "这个问题你得亲自去问！0.0", "媳妇//嫂嫂//弟妹", 
				"你滴老爹", "你滴老娘","我//哥哥//弟弟", "弟弟", "我//姐姐//妹妹", "妹妹", "儿子//侄子", "闺女//侄女", "这个问题你得亲自去问！0.0", "弟妹", 
				"你滴老爹", "你滴老娘", "我//哥哥//弟弟","我//哥哥//弟弟", "我//姐姐//妹妹", "我//姐姐//妹妹", "儿子//外甥", "闺女//外甥女", "老公//姐夫//妹夫", "这个问题你得亲自去问你姐！0.0",
				"你滴老爹", "你滴老娘", "我//哥哥//弟弟","弟弟", "我//姐姐//妹妹", "我//姐姐//妹妹", "外甥", "外甥女", "妹夫", "这个问题你得亲自去问！0.0",
				"妹妹","妹夫","外甥","外甥","外甥女","外甥女","外甥孙","外甥孙女","一般人都很矗的！","外甥媳妇",
				"妹妹","妹夫","外甥","外甥","外甥女","外甥女","外甥孙","外甥孙女","外甥女婿","一般人都很矗的！",
				"姻世伯","姻伯母","姻兄//姻弟","姻兄//姻弟","姻姐//姻妹","姻姐//姻妹","外甥","外甥女","老铁，不存在滴！","妹妹",
				"跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！",						
				"爷爷", "奶奶", "伯伯", "叔叔", "姑姑", "姑姑", "我//哥哥//弟弟", "我//姐姐//妹妹", "你确定你这样查你妈不会打死你!", "你滴老娘",
				"外公", "外婆", "舅舅", "舅舅", "说姨妈不说大", "姨", "我//哥哥//弟弟", "我//姐姐//妹妹", "你滴老爹", "你确定你这样查你爸不会打死你！",
				"你自己咯", "媳妇", "儿子", "儿子","闺女", "闺女", "孙子", "孙女", "你这个儿子了不得啊！", "儿媳", 
				"你自己咯", "媳妇", "儿子", "儿子","闺女", "闺女", "孙子", "孙女", "你这个儿子了不得啊！", "儿媳", 
				"你自己咯", "媳妇", "儿子", "儿子", "闺女", "闺女", "外孙子","外孙女", "女婿", "你这个女儿了不得啊！", 
				"你自己咯", "媳妇", "儿子", "儿子", "闺女", "闺女", "外孙子","外孙女", "女婿", "你这个女儿了不得啊！",
				"儿子","儿媳","孙子","孙子","孙女","孙女","曾孙","曾孙女","一般人都很矗的！","孙媳妇",
				"儿子","儿媳","孙子","孙子","孙女","孙女","外曾孙","外曾孙女","孙女婿","一般人都很矗的！",
				"跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！",						
				"亲家公","亲家母","姻侄","姻侄","姻侄女","姻侄女","孙子","孙女","儿子","一般人都很矗的！",
				"爷爷", "奶奶", "伯伯", "叔叔", "姑姑", "姑姑", "我//哥哥//弟弟", "我//姐姐//妹妹", "你确定你这样查你妈不会打死你!", "你滴老娘",
				"外公", "外婆", "舅舅", "舅舅", "说姨妈不说大", "姨", "我//哥哥//弟弟", "我//姐姐//妹妹", "你滴老爹", "你确定你这样查你爸不会打死你！",
				"你自己咯", "媳妇", "儿子", "儿子","闺女", "闺女", "孙子", "孙女", "你这个儿子了不得啊！", "儿媳", 
				"你自己咯", "媳妇", "儿子", "儿子","闺女", "闺女", "孙子", "孙女", "你这个儿子了不得啊！", "儿媳", 
				"你自己咯", "媳妇", "儿子", "儿子", "闺女", "闺女", "外孙子","外孙女", "女婿", "你这个女儿了不得啊！", 
				"你自己咯", "媳妇", "儿子", "儿子", "闺女", "闺女", "外孙子","外孙女", "女婿", "你这个女儿了不得啊！",
				"女婿","闺女","外孙子","外孙子","外孙女","外孙女","外曾孙","外曾孙女","一般人都很矗滴！","外孙媳妇",
				"儿子","儿媳","孙子","孙子","孙女","孙女","外曾孙","外曾孙女","外孙女婿","一般人都很矗滴！",
				"亲家公","亲家母","姻侄","姻侄","姻侄女","姻侄女","外孙子","外孙女","一般人都很矗滴！","闺女",
				"跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！",							
				"祖翁","祖婆","伯翁","叔翁","姑婆","姑婆","老公//大伯哥//小叔子","大姑姐//小姑子","老铁，不存在滴！","公婆",
				"外公","外婆","舅老爷","舅老爷","姨奶奶","姨奶奶","老公//大伯哥//小叔子","大姑姐//小姑子","公公","老铁，不存在滴！",
				"公公","婆婆","大伯哥","老公//大伯哥//小叔子","大姑姐","大姑姐//小姑子","侄子","侄女","老铁，不存在滴！","妯娌",
				"公公","婆婆","老公//大伯哥//小叔子","小叔子","大姑姐//小姑子","小姑子","侄子","侄女","老铁，不存在滴！","妯娌",
				"公公","婆婆","大伯哥","老公//大伯哥//小叔子","大姑姐","大姑姐//小姑子","外甥","外甥女","姑爷","老铁，不存在滴！",
				"公公","婆婆","老公//大伯哥//小叔子","小叔子","大姑姐//小姑子","小姑子","外甥","外甥女","姑爷","老铁，不存在滴！",				
				"老公","你自己咯","儿子","儿子","闺女","闺女","孙子","孙女","一般人都很矗滴！","儿媳",
				"老公","你自己咯","儿子","儿子","闺女","闺女","外孙子","外孙女","女婿","一般人都很矗滴！",
				"跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！",						
				"老爸","老妈","哥哥","弟弟","姐姐","妹妹","儿子","闺女","老公","一般人都很矗滴！",
				"太岳父","太岳母","伯岳","叔岳","姑岳母","姑岳母","大舅子//小舅子","大姨子//老婆//小姨子","老铁，不存在滴！","丈母娘",
				"外太岳父","外太岳母","舅岳父","舅岳父","姨岳母","姨岳母","大舅子//小舅子","大姨子//老婆//小姨子","老丈人","老铁，不存在滴！",
				"老丈人","丈母娘","大舅子//小舅子","大舅子//小舅子","大姨子//老婆//小姨子","大姨子//老婆//小姨子","内侄","内侄女","老铁，不存在滴！","舅嫂",
				"老丈人","丈母娘","大舅子//小舅子","大舅子//小舅子","大姨子//老婆//小姨子","大姨子//老婆//小姨子","内侄","内侄女","老铁，不存在滴！","舅嫂",
				"老丈人","丈母娘","大舅子//小舅子","大舅子//小舅子","大姨子//老婆//小姨子","大姨子//老婆//小姨子","内甥","内甥女","大姨夫","老铁，不存在滴！",
				"老丈人","丈母娘","大舅子//小舅子","大舅子//小舅子","大姨子//老婆//小姨子","大姨子//老婆//小姨子","内甥","内甥女","小姨夫","老铁，不存在滴！",
				"你自己咯", "媳妇", "儿子", "儿子","闺女", "闺女", "孙子", "孙女", "你这个儿子了不得啊！", "儿媳", 
				"你自己咯", "媳妇", "儿子", "儿子", "闺女", "闺女", "外孙子","外孙女", "女婿", "你这个女儿了不得啊！", 
				"老爸","老妈","哥哥","弟弟","姐姐","妹妹","儿子","闺女","一般人都很矗滴！","媳妇",
				"跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！","跟你说了不存在滴！",						
		};
		int k6 = 0;
		for (int i = 0; i < show4.length; i++) {
			for (int j = 0; j < show2.length; j++) {
				show6[k6] = data4[i] + show2[j];
				if (k6 < show6.length) {
					k6++;
				}
			}

		}		
			for (int i = 0; i < data2.length; i++) {
				
				if (result.equals(show2[i])) {
					result = data2[i];
					isFind = true;
				}
			}
					
			for (int i = 0; i < data4.length; i++) {
				if (result.equals(show4[i])) {
					result = data4[i];
					isFind = true;
				}
			}

			for (int i = 0; i < data6.length; i++) {
				if (result.equals(show6[i])) {
					result = data6[i];
					isFind = true;
				}
			}
			if(!isFind&&!result.equals("")){
				result = "有点远哈";
			}
		return result;
	}

}
